
These files are used to replicate all analyses in "Islamic political parties and election campaigns in Indonesia" by Colm Fox (Singapore Management University) and Jeremy Menchik (Boston University). Published in Party Politics May 16th 2022.

Stata 16 was used to do the analysis, but versions as early as 12.1 should also work. 
To run analysis.do you need to install:
	outreg2
	cibplot

After downloading the dataset, and before running the do files, create these two folders

\tables
	This folder contains all tables generated by analysis.do
\figures
	This folder contains all figures generated by analysis.do

Next, run the files by going into the \do folder and then:
1. Run appeals.do. This makes the dependent variables from the election poster codes csv file. It saves out as dta\appeals.dta.
2. Run db.do. It does all the variable transformations and data cleaning. It uses the csv files stored in the csv folder and the dta\appeals.dta file. It creates a file called dta\db_can.dta and dta\db_pos.dta.
3. Run can_an.do. It uses the dta\db_can.dta file and runs all the estimation and graphing commands for all the tables and figures which use the candidate as the unit of analysis (observations). They are saved in the tables and figures folders.
4. Run pos_an.do. It uses the dta\db_pos.dta and makes all tables and figures that use the poster as the unit of analysis (observation).


Description of Files and Folders

readme.txt
	This file that you are reading.

	
\do
	This folder contains all the do files to made the database and do the analysis
	
		appeals.do
			The file that creates the dependent variables from the election poster codes.

		db.do
			The file that makes the database.

		an_can.do
			The file used in the analysis with candidate observations.
			
		an_pos.do
			The file used in the analysis with poster observations.

\dta
	This folder is where all .dta files are stored. It contains:
	
		appeals.dta
			The file with the coded election poster data.

		regional.dta
			The file with regional data, such as ethnic demographics.
	

If you have any questions on the files or find any errors, please let me know at colmfox@smu.edu.sg.


***********************
May 2022
Singapore


